<template>
  <div class="container">
    <div>
      <el-row :gutter="12">
        <el-col :span="7">
          <el-form ref="form" :model="form">
            <el-form-item label="开始时间：">
              <el-date-picker
                v-model="form.startDate"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
            <el-form-item label="结束时间：">
              <el-date-picker
                v-model="form.endDate"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="6">
          <el-form ref="form" :model="form">
            <el-form-item label="餐饮单位名称：">
              <el-input
                v-model="form.pointName"
                style="width: 180px"
              ></el-input>
            </el-form-item>
          </el-form>
        </el-col>
        <!-- <el-col :span="6">
          <el-form ref="form" :model="form">
            <el-form-item label="">
              <el-date-picker
                v-model="form.endDate"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
            <el-form-item label="签批状态：">
              <el-select
                v-model="form.ok"
                placeholder="请选择"
                style="width: 180px"
              >
                <el-option
                  v-for="item in select.OKType"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </el-col> -->
        <el-col :span="4">
          <el-form ref="form" :model="form" style="float: left">
            <el-button size="mini" type="primary" @click="getTableData"
              >查 询</el-button
            >
            <el-button size="mini" type="success" @click="handleNew"
              >新 增</el-button
            >
            <!-- <el-button size="mini" type="success" @click="exportExcel"
              >导 出</el-button
            > -->
          </el-form>
        </el-col>
      </el-row>
    </div>
    <el-table
      :data="
        tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
      "
      border
    >
      <el-table-column
        prop="企业名称"
        label="餐饮单位名称"
        align="center" 
        width="480"
      ></el-table-column>
      <!-- <el-table-column
        prop="店名"
        label="门头名称"
        align="center"
      ></el-table-column> -->
      <el-table-column
        prop="联系人"
        label="联系人"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="联系电话"
        label="联系电话"
        align="center"
      ></el-table-column>
      <el-table-column prop="合同有效期" label="合同有效期"></el-table-column>
      <el-table-column prop="油品类" label="油品类"></el-table-column>
      <el-table-column prop="预估量" label="预估量"></el-table-column>
      <el-table-column label="扫描件" width="180">
        <template slot-scope="scope">
          <el-button
            type="text"
            @click="handleEdit(scope.$index, scope.row)"
            >编辑</el-button
          >
          <el-button
            type="text"
            v-if="scope.row.扫描件 != ''"
            @click="handleOpen(scope.$index, scope.row)"
            >下载</el-button
          >
        </template>
      </el-table-column>
      <!-- <el-table-column label="操作" width="200">
        <template slot-scope="scope">
          <el-button type="text" @click="handleEdit(scope.$index, scope.row)"
            >编辑</el-button
          >
          <el-button type="text" @click="handleDelete(scope.$index, scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column> -->
      <!-- <el-table-column label="监管" width="100">
        <template slot-scope="scope">
          <el-button
            type="text"
            @click="handleRegulate(scope.$index, scope.row)"
            >评价</el-button
          >
        </template>
      </el-table-column> -->
    </el-table>
    <div class="pagination">
      <el-pagination
        background
        layout="total, sizes, prev, pager, next, jumper"
        :current-page="currentPage"
        :page-size="pageSize"
        :total="tableData.length"
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
      ></el-pagination>
    </div>

    <el-dialog
      title="上传合同照片"
      :visible.sync="showSignPhoto"
      width="50%"
      @close="handleClosePic"
    >
      <el-form>
        <el-form-item>
          <el-button @click="openFolder">选择图片</el-button>
          <input
            type="file"
            ref="PicFile"
            style="display: none"
            accept="image/*"
            @change="uploadPic"
          />
        </el-form-item>
      </el-form>
      <el-upload
        :file-list="formPhoto.imageList"
        ref="PicUpload"
        list-type="picture"
        :on-preview="handlePreviewPic"
        :on-remove="
          (file, fileList) => {
            handleRemovePic(file, fileList, index)
          }
        "
      >
        <div slot="tip" class="el-upload__tip">
          只能上传jpg/png文件，且不超过500kb。请点击【上传】按钮完成上传操作。
        </div>
      </el-upload>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showSignPhoto = false">取 消</el-button>
        <el-button type="primary" @click="updateSignPhoto()">上 传</el-button>
      </span>
    </el-dialog>
    <el-dialog title="合同照片信息" :visible.sync="dialogVisible">
      <img width="100%" :src="dialogImageUrl" alt="" />
    </el-dialog>
    <!-- [{"企业名称":"11""油品类":"动物油","预估量":"","扫描件":"55","POINT_ID":"69"}] -->
    <el-dialog
      title="合同信息"
      :visible.sync="showRegisterInfoDetail"
      width="50%"
    >
      <el-form class="flex" ref="form" :model="form" label-width="150px">
        <el-form-item label="餐饮单位名称：" style="width: 50%">
          <el-input style="width: 210px" v-model="formRow.企业名称"></el-input>
        </el-form-item>
        <!-- <el-form-item label="门头名称：" style="width: 50%">
          <el-select
            style="width: 210px"
            :disabled="formRow.POINT_ID"
            v-model="formRow.店名"
            placeholder="请选择"
          >
            <el-option
              v-for="item in select.PlacePoint"
              :key="item.NAME"
              :label="item.NAME"
              :value="item.NAME"
            ></el-option>
          </el-select>
        </el-form-item> -->
        <el-form-item label="联 系 人：" style="width: 50%">
          <el-input style="width: 210px" v-model="formRow.联系人"></el-input>
        </el-form-item>
        <el-form-item label="联系电话：" style="width: 50%">
          <el-input style="width: 210px" v-model="formRow.联系电话"></el-input>
        </el-form-item>
        <el-form-item label="合同有效期：" style="width: 50%">
          <el-date-picker
            v-model="formRow.合同有效期"
            type="date"
            placeholder="选择日期"
            value-format="yyyy-MM-dd"
            style="width: 210px"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="油品类：" style="width: 50%">
          <el-select
            multiple
            collapse-tags
            v-model="formRow.OilARR"
            placeholder="请选择"
            @change="$forceUpdate()"
          >
            <el-option
              v-for="item in select.PointType"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="预估量：" style="width: 50%">
          <el-input style="width: 210px" v-model="formRow.预估量"></el-input>
        </el-form-item>
        <!-- <el-form-item style="width: 50%"> </el-form-item> -->
        <!-- <el-form-item label="扫描件：">
          <el-input style="width: 210px" v-model="formRow.PHOTO"></el-input>
        </el-form-item> -->
        <el-form-item label="扫描件：">
          <el-button size="mini" type="success" @click="clickVehicle">
            <span v-if="this.fileUrl">重新上传</span>
            <span v-else>上传扫描件</span>
          </el-button>
          <span style="margin-left: 50px">{{ this.fileUrl }}</span>
          <input
            type="file"
            ref="VehicleFile"
            style="display: none"
            @change="changeVehicle"
          />
        </el-form-item>
        <!-- <el-form-item label="商户类型：">
          <el-select
            style="width: 210px"
            v-model="formRow.POINT_TYPE"
            placeholder="请选择"
          >
            <el-option
              v-for="item in select.PointType"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item style="height: 6.771vw;" label="垃圾类型：" >
          <div
            class="icon-con"
            v-for="(item, index) in select.RubbishTypeList"
            :key="index"
          >
            <el-checkbox
              v-model="item.CLIENT_NO"
              >{{ item.INFO }}</el-checkbox
            >
          </div>
        </el-form-item> -->
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showRegisterInfoDetail = false">取 消</el-button>
        <el-button type="primary" @click="handleSure()">确 定</el-button>
      </span>
    </el-dialog>

    <el-dialog
      title="监管评价修改"
      :visible.sync="showDialogRegulate"
      width="50%"
    >
      <el-form class="flex" ref="form" :model="form" label-width="120px">
        <el-form-item label="评价：">
          <el-select v-model="formRegulate.regulateValue" placeholder="请选择">
            <el-option
              v-for="item in select.RegulateType"
              :key="item.label"
              :label="item.label"
              :value="item.label"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showDialogRegulate = false">取 消</el-button>
        <el-button type="primary" @click="updateRegulateInfo()"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
<script>
import '@/assets/css/common.css'
import { formatDate } from '@/common/js/date.js'
import OSS from 'ali-oss';
export default {
  data () {
    return {
      currentPage: 1, //初始页
      pageSize: 10,    //    每页的数据
      tableData: [],
      fileUrl: '',
      form: {
        // startDate: formatDate(new Date(new Date() - 3600 * 1000 * 24 * 30), 'yyyy-MM-dd'),
        // endDate: formatDate(new Date(), 'yyyy-MM-dd'),
        startDate: formatDate(new Date(new Date().getTime() - 3600 * 1000 * 24 * 30), 'yyyy-MM-dd'),
        endDate: formatDate(new Date(new Date().getTime() + 3600 * 1000 * 24), 'yyyy-MM-dd'),
        pointName: '',
        pointParent: '',
        pointClient: '',
        ok: '-1',

      },
      formRow: {},
      formRegulate: {
        id: '',
        regulateValue: '',
      },
      formPhoto: {
        pointID: '',
        imageList: []
      },
      select: {
        ClientParentList: null,
        ClientList: null,
        PlacePoint: [],
        RoadList: null,
        RubbishTypeList: null,
        RegulateType: [{
          value: '0',
          label: '正常签约，正常收运'
        }, {
          value: '1',
          label: '正常签约，不分类、无产生量'
        }, {
          value: '2',
          label: '正常签约，非法转卖'
        }, {
          value: '3',
          label: '不签约、不配合'
        }],
        PointType: [{
          value: '5',
          label: '地沟油'
        }, {
          value: '4',
          label: '潲水油'
        }, {
          value: '3',
          label: '动物油'
        }, {
          value: '2',
          label: '隔离油'
        }, {
          value: '1',
          label: '煎炸油'
        }, {
          value: '0',
          label: '其他'
        }],
        // 1为煎炸油，2为隔离油，3为动物油，4为潲水油，0为其他
        OKType: [{
          value: '-1',
          label: '全部'
        }, {
          value: '0',
          label: '待签批'
        }, {
          value: '1',
          label: '已签批'
          // }, {
          //   value: '2',
          //   label: '驳回'
        }],
      },
      dialogImageUrl: '',
      dialogVisible: false,
      showRegisterInfoDetail: false,
      showDialogRegulate: false,
      showSignPhoto: false,
      //图片上传
      dataObj: {
        region: 'oss-cn-beijing',//我的存储是北京，可根据具体配置自行修改
        accessKeyId: 'LTAISI12uxTRFccz',
        accessKeySecret: 'cQAvLIZ9JizT5RXRNPBVcXfg3iURD8',
        bucket: 'photo-srw-hb2',
      }, //存签名信息
      baseAli: 'oss-cn-beijing.aliyuncs.com',
    }
  },
  created () {
    this.getPlacePointSelect();
  },
  mounted () {
    this.getTableData();
    // this.getPlacePointTypeSelect();
  },
  methods: {

    async updateSignStatus (pointID) {
      var url = 'Sign/UpdataPlaceInformationIsok?POINT_ID=' + pointID
      const { data } = await this.$Http.get(url)
      if (data.IsSucess) {
        this.$message.success('合同签批成功')
        this.getTableData()
      } else {
        this.$message.error('签批失败，请重新签批')
      }
    },
    async updateSignPhoto () {
      var photo = ''
      this.formPhoto.imageList.forEach(element => {
        photo += element.url + ';'
      });
      photo = photo.slice(0, photo.length - 1);
      var url = 'Sign/UpdataPlaceInformationPhoto?PHOTO=' + photo + '&POINT_ID=' + this.formPhoto.pointID
      const { data } = await this.$Http.get(url)
      if (data.IsSucess) {
        this.$message.success('合同照片上传成功')
        this.showSignPhoto = false
        this.getTableData()
      } else {
        this.$message.error('上传失败，请重新上传')
      }
    },
    handleSure () {
      var str = '';
      this.formRow.OilARR.forEach(element => {
        str = str + element + '、'
      });
      str = str.substring(0, str.length - 1);
      this.formRow.OIL_TYPE_VALUE = str
      if (this.formRow.POINT_ID) {
        this.updatePaperPP()
      } else {
        this.insertPaperPP()
      }
    },
    async insertPaperPP () {
      var placePointData = {
        COMPANY: this.formRow.企业名称,
        LEADER: this.formRow.联系人,
        PHONE: this.formRow.联系电话,
        VAILD: this.formRow.合同有效期,
        OIL_TYPE: this.formRow.OIL_TYPE_VALUE,
        OIL_NUM: this.formRow.预估量,
        PHOTO: this.fileUrl,
      };
      console.log(placePointData)
      // console.log(this.formRow)
      //       POINT_ID：点位ID，店名下拉选择后获取的ID
      // COMPANY：企业名称
      // LEADER：联系人
      // PHONE：联系电话
      // VAILD：合同有效期
      // OIL_TYPE：油品类，1为煎炸油，2为隔离油，3为动物油，4为潲水油，0为其他
      // OIL_NUM：预估量
      // PHOTO：合同扫描件存储路径
      this.$axios({
        url: 'VehicleOil/InsertPaperPP',
        method: 'post',
        data: placePointData,
      }).then((res) => {
        if (res.data.IsSucess) {
          this.$message.success('新增合同信息成功');
          this.showRegisterInfoDetail = false
          this.getTableData()
        } else {
          this.$message.error('新增合同信息失败');
        }
      })
    },
    async updatePaperPP () {
      var placePointData = {
        COMPANY: this.formRow.企业名称,
        LEADER: this.formRow.联系人,
        PHONE: this.formRow.联系电话,
        VAILD: this.formRow.合同有效期,
        OIL_TYPE: this.formRow.OIL_TYPE_VALUE,
        OIL_NUM: this.formRow.预估量,
        PHOTO: this.fileUrl,
      };
      console.log(placePointData)
      //       POINT_ID：点位ID，店名下拉选择后获取的ID
      // COMPANY：企业名称
      // LEADER：联系人
      // PHONE：联系电话
      // VAILD：合同有效期
      // OIL_TYPE：油品类，1为煎炸油，2为隔离油，3为动物油，4为潲水油，0为其他
      // OIL_NUM：预估量
      // PHOTO：合同扫描件存储路径
      this.$axios({
        url: 'VehicleOil/UpdatePaperPP',
        method: 'post',
        data: placePointData,
      }).then((res) => {
        if (res.data.IsSucess) {
          this.$message.success('编辑合同信息成功');
          this.showRegisterInfoDetail = false
          this.getTableData()
        } else {
          this.$message.error('编辑合同信息失败');
        }
      })
    },
    async getPlacePointSelect () {
      // this.select.PlacePoint = [{ "NAME": "北京豪杰阳光餐饮有限公司山西刀削面", "ID": "69" }, { "NAME": "北京润桥餐饮管理有限公司", "ID": "70" }, { "NAME": "大盘鸡", "ID": "71" }, { "NAME": "老京味烤鸭", "ID": "72" }, { "NAME": "中国石化销售股份有限公司北京石油分公司", "ID": "73" }, { "NAME": "北京红袖餐饮有限公司", "ID": "74" }, { "NAME": "汤山一品海鲜饺子馆", "ID": "75" }, { "NAME": "北京杰博斐弘超市有限公司", "ID": "76" }, { "NAME": "北京汤山亿京福餐饮店", "ID": "77" }, { "NAME": "愚人小馆", "ID": "78" }, { "NAME": "北京宏鹰宾源餐饮服务有限公司", "ID": "79" }]

      var url = 'VehicleOil/PlacePointSelectList?CLIENT_NO=' + localStorage.getItem('CLIENT_NO')
      const { data } = await this.$Http.get(url)
      this.select.PlacePoint = data
      // console.log(this.select.PlacePoint)
    },
    async getTableData () {
      var url = 'VehicleOil/GetPointPaperInfo?ClientNo=' + localStorage.getItem('CLIENT_NO')
        + '&StartDate=' + this.form.startDate + '&EndDate=' + this.form.endDate + '&Name= '
      const { data } = await this.$Http.get(url)
      // data.forEach(element => {
      //   var arraySignPhoto = element.合同照片.split(';')
      //   if (arraySignPhoto.length > 0) {
      //     element.signPhoto = arraySignPhoto[0]
      //     element.signPhotoList = arraySignPhoto
      //   } else {
      //     element.signPhoto = ''
      //     element.signPhotoList = []
      //   }
      // });
      this.tableData = data
      if(this.form.pointName) this.tableData = this.tableData.filter(item => item.企业名称.includes(this.form.pointName))
    },
    // 新建
    handleNew (index, row) {
      this.formRow = {}
      this.fileUrl = ''
      this.showRegisterInfoDetail = true;
    },
    // 详情
    handleEdit (index, row) {
      // this.getClientParentInfoSelect();
      // this.getClientInfoSelect();
      // this.getRoadInfoSelect();
      // this.select.RubbishTypeList = this.select.RubbishTypeList;

      this.formRow = {}
      this.formRow = Object.assign({}, row);
      var arrOil = []
      //     PointType: [{
      //   value: '5',
      //   label: '地沟油'
      // }, {
      //   value: '4',
      //   label: '潲水油'
      // }, {
      //   value: '3',
      //   label: '动物油'
      // }, {
      //   value: '2',
      //   label: '隔离油'
      // }, {
      //   value: '1',
      //   label: '煎炸油'
      // }, {
      //   value: '0',
      //   label: '其他'
      if (this.formRow.油品类.indexOf("其他") != -1) {
        arrOil.push('0')
      }
      if (this.formRow.油品类.indexOf("煎炸油") != -1) {
        arrOil.push('1')
      }
      if (this.formRow.油品类.indexOf("隔离油") != -1) {
        arrOil.push('2')
      }
      if (this.formRow.油品类.indexOf("动物油") != -1) {
        arrOil.push('3')
      }
      if (this.formRow.油品类.indexOf("潲水油") != -1) {
        arrOil.push('4')
      }
      if (this.formRow.油品类.indexOf("地沟油") != -1) {
        arrOil.push('5')
      }
      this.formRow.OilARR = arrOil
      // this.select.PointType.forEach(element => {
      //   if (this.formRow.油品类 == element.label) {
      //     this.formRow.OIL_TYPE_VALUE = element.value
      //   }
      // });

      this.fileUrl = ''
      this.fileUrl = this.formRow.扫描件

      console.log(this.formRow)

      this.showRegisterInfoDetail = true;
    },
    async handleDelete (index, row) {
      const confirmResult = await this.$confirm('确定删除？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).catch(err => err)
      if (confirmResult == 'confirm') {
        var url = 'VehicleOil/DeletePaperPP?ID=' + row.POINT_ID
        const { data } = await this.$Http.get(url)
        if (data.IsSucess) {
          this.$message.success('删除合同信息成功');
          this.getTableData()
        } else {
          this.$message.error('删除合同信息失败');
        }

      } else {
        this.$message.info('取消删除')
        this.isVisibleEdit = false
      }

    },
    // handleClose () {
    //   this.$("input[name='checkboxRubbishType']").prop('checked',false)
    //   // this.$refs.form.clearFiles()
    //   // this.$refs.form.value = null; // 移除文件，可以保证上传同样的文件时，也会触发change事件
    // },
    //上传合同照片
    // 点击上传车辆图片按钮
    clickVehicle () {
      this.$refs.VehicleFile.click();

    },
    changeVehicle () {
      this.afterRead1(this.$refs.VehicleFile.files[0]);
      this.$refs.VehicleFile.value = null; // 移除文件，可以保证上传同样的文件时，也会触发change事件
    },
    // 上传垃圾点图片
    afterRead1 (file) {
      return new Promise((resolve, reject) => {
        // 此时可以自行将文件上传至服务器
        const that = this
        let client = new OSS(this.dataObj)
        const fileName = file.name
        //定义唯一的文件名，打印出来的uid其实就是时间戳
        //client 是第一步中的 client
        client
          .multipartUpload(fileName, file)
          .then((result) => {
            //下面是如果对返回结果再进行处理，根据项目需要
            // console.log(result)
            that.fileUrl =
              'http://' +
              result.bucket +
              '.' +
              that.baseAli +
              '/' +
              result.name
            console.log(that.fileUrl)
            resolve()
          })
          .catch((err) => {
            console.log('err:', err)
            reject()
          })
      })
    },
    handleUpdatePhoto (index, row) {
      this.formPhoto = {
        pointID: '',
        imageList: []
      }
      this.formPhoto.pointID = row.POINT_ID
      row.合同照片.split(';').forEach(element => {
        var arrayStr = element.split('/')
        if (arrayStr.length > 1) {
          this.formPhoto.imageList.push({ name: arrayStr[arrayStr.length - 1], url: element })
        }
      });
      console.log(this.formPhoto)
      this.showSignPhoto = true
    },
    openFolder () {
      this.$refs.PicFile.click();
    },
    uploadPic () {
      this.readPic(this.$refs.PicFile.files[0]);
      this.$refs.PicFile.value = null; // 移除文件，可以保证上传同样的文件时，也会触发change事件
    },
    readPic (file) {
      return new Promise((resolve, reject) => {
        // 此时可以自行将文件上传至服务器
        const that = this
        let client = new OSS(this.dataObj)
        const fileName = file.name
        //定义唯一的文件名，打印出来的uid其实就是时间戳
        //client 是第一步中的 client
        client
          .multipartUpload(fileName, file)
          .then((result) => {
            //下面是如果对返回结果再进行处理，根据项目需要
            // console.log(result)
            var url =
              'https://' +
              result.bucket +
              '.' +
              that.baseAli +
              '/' +
              result.name
            console.log(url)
            that.completeUploadPic(result.name, url)
            resolve()
          })
          .catch((err) => {
            console.log('err:', err)
            reject()
          })
      })
    },
    completeUploadPic (name, url) {
      this.formPhoto.imageList.push({ name: name, url: url })
    },
    // 删除图片
    handleRemovePic (file, fileList, index) {
      console.log('删前')
      console.log(this.formPhoto.imageList)
      this.formPhoto.imageList.splice(index, 1);
      console.log('删后')
      console.log(this.formPhoto.imageList)
    },
    // 放大图片
    handlePreviewPic (file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    // 关闭图片编辑窗口
    handleClosePic () {
      this.$refs.PicUpload.clearFiles()
    },
    // 关闭图片预览窗口
    handleClosePicPreview () {
      this.$nextTick(() => {
        let domImageMask = document.querySelector(".el-image-viewer__mask");
        if (domImageMask) {
          domImageMask.addEventListener("click", () => {
            document.querySelector(".el-image-viewer__close").click();
          })
        }
      })
    },
    // 签批
    // handleSign (index, row) {
    //   this.$confirm('确认执行签批操作？', '提示', {
    //     confirmButtonText: '确认',
    //     cancelButtonText: '取消',
    //     type: 'warning'
    //   }).then(() => {
    //     this.updateSignStatus(row.POINT_ID)
    //   }).catch(() => {
    //   });
    // },
    handleOpen (index, row) {
      window.open(row.扫描件)
    },
    // 监管
    // handleRegulate (index, row) {
    //   this.formRegulate.id = row.POINT_ID;
    //   this.getRegulateInfo();
    // },
    async getRegulateInfo () {
      var url = 'Sign/GetCollectionApplyInfo?POINT_ID=' + this.formRegulate.id
      const { data } = await this.$Http.get(url)
      if (data.length) {
        this.formRegulate.regulateValue = data[0].REGULATE
      }
      this.showDialogRegulate = true;
    },
    async updateRegulateInfo () {
      var url = 'Sign/UpdateRegulateInfo?POINT_ID=' + this.formRegulate.id + '&REGULATE=' + this.formRegulate.regulateValue
      const { data } = await this.$Http.get(url)
      if (data.IsSucess) {
        this.$message.success('修改成功')
        this.showDialogRegulate = false;
      } else {
        this.$message.error(data.Message)
      }
    },
    // 分页导航
    handlePageChange (currentPage) {
      this.currentPage = currentPage;
    },
    handleSizeChange (size) {
      this.pageSize = size;
      this.currentPage = 1;
    },

    // async getClientParentInfoSelect () {
    //   var url = 'Sign/GetClientParentInfoSelect?CLIENT_NO=' + localStorage.getItem('CLIENT_NO')
    //   const { data } = await this.$Http.get(url)
    //   this.select.ClientParentList = data
    // },
    // async getClientInfoSelect () {
    //   this.formRow.街道 = ''
    //   this.formRow.CLIENT_NO = ''
    //   this.formRow.街 = ''
    //   var url = 'Sign/GetClientInfoSelect?CLIENT_NO=' + this.formRow.PARENT_NO
    //   const { data } = await this.$Http.get(url)
    //   this.select.ClientList = data
    // },
    // async getRoadInfoSelect () {
    //   this.formRow.街 = ''
    //   var url = 'Sign/GetRoadInfoSelect?CLIENT_NO=' + this.formRow.CLIENT_NO
    //   const { data } = await this.$Http.get(url)
    //   this.select.RoadList = data
    // },
    // async getPlacePointTypeSelect () {
    //   var url = 'Sign/GetPlacePointTypeSelect?CLIENT_NO=' + localStorage.getItem('CLIENT_NO')
    //   const { data } = await this.$Http.get(url)
    //   this.select.RubbishTypeList = data
    // },
  }
}
</script>
<style>
.el-select__tags {
  top: 5px;
  transform: none;
  /* transform: translateY(-50%);
  -webkit-transform: translateY(-50%); */
  -webkit-transform: none;
}
</style>